//
//  HTTPManager.h
//  dongpeng-iOs
//
//  Created by 张育铭 on 2017/9/21.
//  Copyright © 2017年 dongpeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface HTTPManager : AFHTTPSessionManager

+ (instancetype)sharedInstance;

/**
* Post 数据网络请求
*/
- (NSURLSessionDataTask*)postWithPath:(NSString*)path parametersDict:(NSDictionary*)Parameter sucessBlock:(void(^)(NSURLSessionDataTask *operation, id responseObject))sucess failtBlock:(void(^)(NSURLSessionDataTask *operation, id error))failt;

/**
* Get 数据网络请求
*/
- (NSURLSessionDataTask*)GetWithPath:(NSString*)path parametersDict:(NSDictionary*)Parameter sucessBlock:(void(^)(NSURLSessionDataTask *operation, id responseObject))sucess failtBlock:(void(^)(NSURLSessionDataTask *operation, id error))failt;









- (NSURLSessionDataTask*)postWithPath:(NSString*)path
                            parametersDict:(NSDictionary*)Parameter
                               sucessBlock:( void(^)(id responseObject))sucess;

- (NSURLSessionDataTask *)postWithPath:(NSString *)path
                        parametersDict:(NSDictionary *)Parameter
                             imageData:(NSData *)imageData
                              postName:(NSString *)postName
                              fileName:(NSString *)fileName
                              miniType:(NSString *)miniType
                          successBlock:(void (^)(NSURLSessionDataTask *operation, id responseObject))success
                            failtBlock:(void (^)(NSURLSessionDataTask *operation, NSError *error))failt;

@end
